<template>
  <div>
    <Header></Header>
    <router-view></router-view>
    <Footer v-show="isShowHidden"></Footer>
   </div>
</template>

<script>
import Header from "@/components/Header";
import Footer from "@/components/Footer";
export default {
  name: "App",
  components: {Footer, Header},
  computed:{
    isShowHidden(){
      // 方法1:用路由的name来判断在登录页还是注册页是否有Footer组件
      // return this.$route.name !== "login" && this.$route.name !== "register"
      // 方法2:通过meta元信息来判判断isHidden是否为true和false
      return !this.$route.meta.isHidden
    }
  }
}
</script>

<style>

</style>